home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 3 / Cream of the Crop 3.iso / utility / mu17_ext.zip / RLSERVLI.C < prev    next >
C/C++ Source or Header  |  1994-03-07  |  1KB  |  54 lines

  1. /*
  2. **    $VER: rlservlib.c 1.0 (14.01.94)
  3. **
  4. **    rlogin.service library standard functions
  5. **
  6. **    ⌐ Copyright 1994 by Norbert Pⁿschel
  7. **    All Rights Reserved
  8. */
  9.  
  10. #include <proto/exec.h>
  11. #include <proto/dos.h>
  12. #include <proto/utility.h>
  13.  
  14. #include <rexx/storage.h>
  15.  
  16. struct DosLibrary *DOSBase;
  17. struct Library *UtilityBase;
  18.  
  19. volatile ULONG NumProcs = 0;
  20.  
  21. BOOL __saveds __asm LIBGlobalAlloc(register __d0 struct Library *Base)
  22.  
  23. {
  24.   DOSBase = (struct DosLibrary *)OpenLibrary("dos.library",37);
  25.   if(DOSBase) {
  26.     UtilityBase = OpenLibrary("utility.library",37);
  27.     if(UtilityBase) {
  28.       return(TRUE);
  29.     }
  30.     CloseLibrary((struct Library *)DOSBase);
  31.   }
  32.   return(FALSE);
  33. }
  34.  
  35. BOOL __saveds __asm LIBGlobalFree(register __d0 struct Library *Base) 
  36.  
  37. {
  38.   if(NumProcs > 0) {
  39.     return(FALSE);
  40.   }
  41.   else {
  42.     CloseLibrary(UtilityBase);
  43.     CloseLibrary((struct Library *)DOSBase);
  44.     return(TRUE);
  45.   }
  46. }
  47.  
  48. LONG __saveds __asm LIBRexxQuery(register __a0 struct RexxMsg *msg,
  49.                                  register __a1 UBYTE **arg)
  50.  
  51. {
  52.   return(1);
  53. }
  54.